﻿using Autofac;
using CommonServiceLocator;
using GalaSoft.MvvmLight.Messaging;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using VisionApp.Interface;
using VisionAppManager.Model;
using VisionAppManager.ViewModel;

namespace VisionAppManager.View
{
    /// <summary>
    /// Interaction logic for UCImgViewer.xaml
    /// </summary>
    public partial class UCImgViewer : UserControl
    {
        public UCImgViewer()
        {
            InitializeComponent();
            updateView();
        }
        private void updateView()
        {
            Worker wk = (Worker)AppEngine.Container.Resolve<IWorker>();
            wk.UpdateVideoHandle(PictureBoxVideoLeft.Child as System.Windows.Forms.PictureBox, PictureBoxVideoRight.Child as System.Windows.Forms.PictureBox);
        }
        //private void GroupBox_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        //{

        //    //AppEngine.Container.Resolve<MainViewModel>().VMWorkspace = AppEngine.Container.Resolve<VMImgViewerCam1>();
        //    //Worker wk = (Worker)AppEngine.Container.Resolve<IWorker>();
        //    //wk.Camera.PBVideoLeft= PictureBoxVideoLeft.Child as System.Windows.Forms.PictureBox;
        //    //wk.Camera.PBVideoRight= PictureBoxVideoRight.Child as System.Windows.Forms.PictureBox;
        //    //wk.Init();
        //    //wk.RunRecordProc1();
        //}

        //private void GroupBox_MouseDoubleClick_1(object sender, MouseButtonEventArgs e)
        //{
        //    AppEngine.Container.Resolve<MainViewModel>().VMWorkspace = AppEngine.Container.Resolve<VMImgViewerCam2>();
        //}

        //private void GroupBox_MouseDoubleClick_2(object sender, MouseButtonEventArgs e)
        //{

        //}

        //private void GroupBox_MouseDoubleClick_3(object sender, MouseButtonEventArgs e)
        //{

        //}
    }
}
